package com.example.rabbitmq.starter.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * RabbitMQ Starter配置属性
 */
@ConfigurationProperties(prefix = "rabbitmq.starter")
public class RabbitMQProperties {

    /**
     * 是否启用RabbitMQ Starter
     */
    private boolean enabled = true;

    /**
     * 是否启用动态配置
     */
    private boolean dynamicConfigEnabled = true;

    /**
     * 是否启用失败消息处理
     */
    private boolean failureHandlingEnabled = true;

    /**
     * 默认最大重试次数
     */
    private int defaultMaxRetryCount = 3;

    /**
     * 默认重试间隔（毫秒）
     */
    private long defaultRetryInterval = 1000;

    /**
     * 是否启用Web管理界面
     */
    private boolean webManagementEnabled = false;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public boolean isDynamicConfigEnabled() {
        return dynamicConfigEnabled;
    }

    public void setDynamicConfigEnabled(boolean dynamicConfigEnabled) {
        this.dynamicConfigEnabled = dynamicConfigEnabled;
    }

    public boolean isFailureHandlingEnabled() {
        return failureHandlingEnabled;
    }

    public void setFailureHandlingEnabled(boolean failureHandlingEnabled) {
        this.failureHandlingEnabled = failureHandlingEnabled;
    }

    public int getDefaultMaxRetryCount() {
        return defaultMaxRetryCount;
    }

    public void setDefaultMaxRetryCount(int defaultMaxRetryCount) {
        this.defaultMaxRetryCount = defaultMaxRetryCount;
    }

    public long getDefaultRetryInterval() {
        return defaultRetryInterval;
    }

    public void setDefaultRetryInterval(long defaultRetryInterval) {
        this.defaultRetryInterval = defaultRetryInterval;
    }

    public boolean isWebManagementEnabled() {
        return webManagementEnabled;
    }

    public void setWebManagementEnabled(boolean webManagementEnabled) {
        this.webManagementEnabled = webManagementEnabled;
    }
}